﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace SampleApp.Web.SysModule.Models
{
    public class UserInfoModel
    {

        [Display(Name = "登录账号")]
        public string UserCode { get; set; }
        [Display(Name = "用户姓名")]
        public string UserName { get; set; }
        [Display(Name = "所属部门")]
        public string DeptName { get; set; }
    }

    public class ChangePasswordModel
    {
        [Required(ErrorMessage="请录入原密码")]
        [DataType(DataType.Password)]
        [Display(Name = "原密码")]
        public string OldPassword { get; set; }

        [Required(ErrorMessage = "请录入新密码")]
        [StringLength(50, ErrorMessage = "至少 {2} 位字符以上.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "新密码")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "再次输入")]
        [Compare("NewPassword", ErrorMessage = "两次密码输入不一致")]
        public string ConfirmPassword { get; set; }
    }

}